﻿@{
    ViewBag.Title = "Sprawdź stan przesyłki";
}

@using (Html.BeginForm())
{
    <div class="col-lg-6">
        <div class="well">
            <fieldset>
                <legend>@ViewBag.Title</legend>
                <div class="form-group">
                    <label>@Html.Label("ID przesyłki:")</label>
                    @Html.TextBox("Text1", null, new { @class = "form-control" })
                </div>
                <p>
                    <input id="Button1" type="submit" value="Sprawdź" class="btn btn-default" />
                </p>
            </fieldset>
        </div>
    </div>
    
    <div class="col-lg-6">
        <div class="well">
            <p>@ViewData["nadanie"]</p>
            <p>@ViewData["dostarczenie"]</p>
            <p>@ViewData["czas"]</p>
        </div>
        <div id="map-canvas"></div>
    </div>
        
    <style>
        #map-canvas
        {
            width: 100%;
            height: 400px;
        }
    </style>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    <script>
        var lat = @ViewData["lat"];
        var lng = @ViewData["lng"];
        function initialize() {
     
            var mapOptions = {
                zoom: 12,
                center: new google.maps.LatLng(lat, lng),
                mapTypeControl: true,
                mapTypeControlOptions: {
                    style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
                    position: google.maps.ControlPosition.BOTTOM_CENTER
                },
                panControl: true,
                panControlOptions: {
                    position: google.maps.ControlPosition.TOP_RIGHT
                },
                zoomControl: true,
                zoomControlOptions: {
                    style: google.maps.ZoomControlStyle.LARGE,
                    position: google.maps.ControlPosition.LEFT_CENTER
                },
                scaleControl: true,
                streetViewControl: true,
                streetViewControlOptions: {
                    position: google.maps.ControlPosition.LEFT_TOP
                }
            }
            var map = new google.maps.Map(document.getElementById('map-canvas'),
                                          mapOptions);
            var marker = new google.maps.Marker({
                position: new google.maps.LatLng(lat, lng),
                map: map,
                title: "blah"
            });
        }

        google.maps.event.addDomListener(window, 'load', initialize);


    </script>
    
}